package main

import "fmt"

func main() {
	var arr1 [5]int

	for i := 0; i < len(arr1); i++ {
		arr1[i] = i * 2
	}

	for i := 0; i < len(arr1); i++ {
		fmt.Printf("数组索引 %d 的值是 %d \n", i, arr1[i])
	}

	fmt.Println("for...range的写法")

	for i := range arr1 {
		fmt.Println("数组条目", i, "是", arr1[i])
	}

}
